#include "comm.hpp"
int main()
{
    umask(0);
    int f1 = open(FIFO_FILE,O_RDONLY);//以只读的方式打开管道没有其他进程以写方式打开会阻塞
    int f2 = open("../hhh1",O_RDWR | O_CREAT,0666);
    std::cout << 1 <<std::endl;
    char buffer[1024] = {0};
    int ret1 = read(f1,&buffer,sizeof(buffer));
    std::cout << 2 <<std::endl;
    std::cout << buffer << std::endl;
    int ret2 = write(f2,buffer,sizeof(buffer) - 1);
    std::cout << 3 <<std::endl;
    return 0;
}